package com.disgnpattern.learn.chapter12;

/**
 * @author dxy
 * @version 1.0
 * @date 2021/11/19 15:23
 * @descrition 基金门面
 * @Version 1.0
 * @mail victorydeng@163.com
 */
public class FoundFacade {
    private Stock1 stock1;
    private Stock2 stock2;
    private Stock3 stock3;
    private NationalDebt1 nationalDebt1;
    private Realty1 realty1;

    public FoundFacade() {
        this.stock1 = new Stock1();
        this.stock2 = new Stock2();
        this.stock3 = new Stock3();;
        this.nationalDebt1 = new NationalDebt1();
        this.realty1 = new Realty1();
    }

    public void sell(){
        stock1.sell();
        stock2.sell();
        stock3.sell();
        nationalDebt1.sell();
        realty1.sell();
    }

    public void buy(){
        stock1.buy();
        stock2.buy();
        stock3.buy();
        nationalDebt1.buy();
        realty1.buy();
    }
}
